package com.wangjiyuan.shiwupai.mine.activitiy;

import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.wangjiyuan.shiwupai.R;
import com.wangjiyuan.shiwupai.base.BaseActivity;

public class LoginedActivity extends BaseActivity {

    private TextView tv_logined_id, tv_logined_name;
    private ImageView img_logined_headPhoto;
    private String id, name, profileImageUrl;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_logined);

        initData();
        initView();
    }

    private void initData() {
        Intent intent = getIntent();
        id = intent.getStringExtra("id");
        name = intent.getStringExtra("name");
        profileImageUrl = intent.getStringExtra("profileImageUrl");

    }

    private void initView() {
        tv_logined_id = (TextView) findViewById(R.id.tv_logined_id);
        tv_logined_name = (TextView) findViewById(R.id.tv_logined_name);
        img_logined_headPhoto = (ImageView) findViewById(R.id.img_logined_headPhoto);

        tv_logined_id.setText(id);
        tv_logined_name.setText(name);
        Glide.with(this)
                .load(profileImageUrl)
                .placeholder(R.mipmap.ic_launcher)
                .into(img_logined_headPhoto);
    }
}
